<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.hsxc.cdz.controller.wxController.jssdk.*"%>
<%@ page import="java.util.HashMap"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.io.*"%>
<html>
<head>
<%
	String url = request.getScheme() + "://" + request.getServerName() + request.getRequestURI();
	if (request.getQueryString() != null) {
		url += "?" + request.getQueryString();
	}
	// request.setAttribute("url", url);
	String code = request.getParameter("code");
	Jssdk.putCode(code);
	Jssdk.putUrl(url);
%>

  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="./weui.min.css">
  <link rel="stylesheet" href="./main.css">
  <title>扫码充电</title>
</head>


<body>
	<%
		Map<String, String> rt = Jssdk.putdata();
		String appId = "wx1ae546982c5e0b27";
		String timestamp = rt.get("timestamp");
		String nonceStr = rt.get("nonceStr");
		String signature = rt.get("signature");
		String jsapi_ticket = rt.get("jsapi_ticket");
		String accesstoken = rt.get("accesstoken");
		String openid = rt.get("openid");
		String urll = rt.get("url");
	%>
<%-- 	<br> access:<%=accesstoken%> --%>
<%-- 	<br> jsapi_ti:<%=jsapi_ticket%> --%>
<%-- 	<br> code-d:<%=code%> --%>
<%-- 	<br> open-f:<%=urll %> --%>
<%--      <br> open-id:<%=openid %>--%> 


  <div class="button_sp_area">
    <p class="message" id="message"></p>
    <a href="#" id="start" class="center weui_btn weui_btn_primary hidden">开始充电</a>
    <a href="#" id="stop" class="center weui_btn weui_btn_primary hidden">停止充电</a>
  </div>
</body>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="./zepto.min.js"></script>
<script>
  var appId = '<%=appId%>';
  var timestamp = <%=timestamp%>;
  var nonceStr = '<%=nonceStr%>';
  var signature = '<%=signature%>';
  var url = '<%=url%>';
  var openid = '<%=openid%>';
</script>
<script src="./main.js"></script>
</html>
